%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Batimento de duas frequências.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;
figure(1);			clf;

alf=1;				bet=.5;				vg =5;
t =[0:.05:20];		x =[-10:.01:100];

for tt=1:length(t)
	x0=sqrt(2*alf)*sqrt(1+bet^2/alf^2*t(tt)^2);
	Y2=pi/sqrt(alf/2)./x0.*exp(-(x-vg*t(tt)).^2/x0^2);
		
	plot(x,Y2,'LineWidth',1.6)
	set(gca,'xLim',[min(x) max(x)],'yLim',[0 5],'FontSize',16,'LineWidth',1.4)
	xlabel('\fontsize{16}{\itx}')
	ylabel('\fontsize{16}{\itY}({\itx},{\itt})')
	pause(.01);
end

